<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .title {
            text-align: center;
            color: #3e3e3e;
        }

        .order {
            /* 合并相邻边框 */
            border-collapse: collapse;
            height: 80px;
            margin: 0 auto;
            text-align: center;
            border-radius: 10px 10px 0 0;
            overflow: hidden;
        }

        /* 给行添加渐变背景颜色 */
        .order tr:nth-child(1) {
            background-image: linear-gradient(to right, #f46e33, #f057a5);
        }

        .order tr:nth-child(2) {
            background-image: linear-gradient(to right, #fdf0eb, #fdeff6);
        }

        .order tr:nth-child(2):last-child {
            color: #f282bb;
        }

        .order th {
            padding: 5px 50px;
            color: #fff;
        }

        .order,
        th,
        td {
            border: 1px solid #fff;
            line-height: 50px;
        }
    </style>
</head>

<body>
    <h2 class="title">订单详情页面</h2>

    <script>
        let moeny = +prompt('请输入银行卡余额');
        let num = +prompt('请输入电费');
        let water = +prompt('请输入水费');
        let site = +prompt('请输入网费');
        let price = moeny - (num + water + site);

        document.write(`
        <table class="order">
        <tr>
            <th>银行卡余额</th>
            <th>电费</th>
            <th>水费</th>
            <th>网费</th>
            <th>银行卡余额</th>
        </tr>
        <tr>
            <td>${moeny}元</td>
            <td>${num}元</td>
            <td>${water}元</td>
            <td>${site}元</td>
            <td>${price}元</td>
        </tr>
    </table>
        `);
    </script>
</body>

</html>